﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace parameterizedthreadstart
{
    class Program
    {
        public static void ThreadMethod(object o)

        {

            for (int i = 0; i < (int)o; i++)

            {

                Console.WriteLine("ThreadProc: {0}", i);

                Thread.Sleep(1000);

            }

        }

        public static void Main()

        {

            Thread t = new Thread(new ParameterizedThreadStart(ThreadMethod));

            t.Start(5);

            t.Join();

            //Console.Read();

        }
    }
}
